package com.example.juc;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;

public class BlockQueueTest {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<Object> queue = new ArrayBlockingQueue<>(2);

      queue.poll(10,TimeUnit.SECONDS);
      queue.poll(10,TimeUnit.SECONDS);
      queue.poll(10,TimeUnit.SECONDS);
      queue.poll(10,TimeUnit.SECONDS);

    }
}
